<template>
  <LoginComponent />
</template>

<script setup>
import LoginComponent from '@/components/LoginComponent.vue'
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()

onMounted(() => {
  // 检查是否已登录，如果已登录则跳转到首页
  const token = localStorage.getItem('token')
  if (token) {
    // 可以在这里添加跳转逻辑，比如跳转到首页
    router.push({ name: 'home' })
  }
})
</script>
